package jvm;

/**
 * @Author: admin
 * @Description:
 * @Date: 2019/6/11 8:08
 */

public class StringTest {
    public static void main(String[] args) {
        StringBuilder sb=new StringBuilder();
        sb.append("a").append("b");
        String s=sb.toString();
        System.out.println(s==s.intern());
        String ss=new String( "123");
        //System.out.println(ss==ss.intern());
        String sss="123";
        //System.out.println(sss==sss.intern());
        System.out.println(sss==ss.intern());
//        String sss=new String("123");
    }
}
